package com.passengerflowmanagementsystem.web.controller.pf;


import com.passengerflowmanagementsystem.common.core.domain.AjaxResult;
import com.passengerflowmanagementsystem.statistics.domain.hk.PfBaseEntity;
import com.passengerflowmanagementsystem.statistics.service.IRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static com.passengerflowmanagementsystem.common.core.domain.AjaxResult.success;

/**
 * 海康区域Controller
 *
 * @author sheng
 * @date 2024-11-26
 */
@RestController
@RequestMapping("/pf/region")
public class PfRegionController {

    @Autowired
    private IRegionService regionService;

    /**
     *
     * 获取根区域信息
     */
    @PostMapping("/regionsRoot")
    public AjaxResult getRegionsList()
    {
        return success(regionService.regionsRoot());
    }

    /**
     * 查询区域列表
     * @return
     */
    @PostMapping("/regionNodesByParams")
    public AjaxResult regionNodesByParams(@RequestBody PfBaseEntity entity)
    {
        return success(regionService.regionNodesByParams(entity));
    }
}
